package com.yejiali.backend.entity.dto;

import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import jakarta.validation.constraints.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * @Author:yejiali
 * @Date:2025/5/16-05-16-11:36
 * @Decsription:com.yejiali.backend.entity.dto
 * @Version:1.0
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class RegisterDTO {
    //用户名
    @NotNull(message = "用户名不能为空")
    private String username;
    //加密密码（bcrypt）
    @NotBlank(message = "密码不能为空")
    @Size(min = 6,max = 16,message = "密码长度为6-16位")
    private String password;
    //真实姓名
    @NotNull(message = "姓名不能为空")
    private String realName;
    //身份
    @NotNull(message = "角色不能为空") //一级审核员 0，二级审核员 1
    private Integer role;
    //头像
    private String avatar;
    //电话
    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号格式不正确") // 中国手机号正则
    private String phoneNumber;
    //邮箱
    @Email
    private String email;

}
